package com.fs.common.sms.utils;

import com.fs.common.sms.enums.PassagewayEnum;
import com.fs.common.sms.vo.Passageway;
import com.fs.common.sms.vo.send.AliyunSend;

/**
 * @author ACE
 * @desc 短信业务处理工具类
 */
public class SmsUtils {
    /**
     * 调用发送接口，发送数据
     * @param way 发送数据
     * @return
     */
    public static String send(PassagewayEnum passagewayEnum, Passageway way){
        String response = null;
        if(way!=null && passagewayEnum!=null){
            String wayType = passagewayEnum.getValue();
            if(PassagewayEnum.ALIBABA.value.equals(wayType)){
                response = new AliyunSend().send(way);
            }else{
                System.err.println(wayType + " 是未知通道，无法处理！");
            }
        }
        return response;
    }
}
